Skip to content

Comments

Add Joint-RPCA to mia: methods, tests, examples, vignette (#789)#804

Open
antagomir wants to merge 2 commits intodevelfrom
rpca
Open

Add Joint-RPCA to mia: methods, tests, examples, vignette (#789)#804
antagomir wants to merge 2 commits intodevelfrom
rpca

Conversation

@antagomir
Copy link
Member

We should proceed towards merging joint-rpca to devel.

Ideally we should get this included in the next Bioc release, there is still time.

@antagomir
Copy link
Member Author

This PR originates from #789

Use examples here - to be moved in the vignettes when this is in mia.

What are the minimum changes to add before we can merge to devel?

The rest can be reported in new issues.

Copy link
Member Author

@antagomir antagomir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems good to me as is.

Comment on lines +185 to +208
jointRPCAuniversal <- function(x, experiments = NULL,
transform = c("rclr", "none"),
optspace.tol = 1e-5,
center = TRUE,
scale = FALSE,
...) {
transform <- match.arg(transform)

assay_names_used <- NULL

if (inherits(x, "MultiAssayExperiment")) {
mae <- .extract_mae_tables(x, experiments)
tables <- mae$tables
experiments <- mae$experiments
assay_names_used <- mae$assay_names_used
} else if (inherits(x, "SummarizedExperiment")) {
tables <- list(assay(x))
anm <- assayNames(x)
nm <- if (length(anm) && !is.na(anm[1])) anm[1] else "assay1"
names(tables) <- nm
} else if (is.list(x) && all(vapply(x, is.matrix, logical(1)))) {
tables <- x
if (is.null(names(tables))) {
names(tables) <- paste0("view", seq_along(tables))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It still lacks usage of generic functions, for instance.

Have @raivo-otus had time to check this? I could also dedicate time to this this week so that we get this done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants